#include "udpServer.hpp"
#include <memory>
#include <iostream>

std::string defualtFunc(const std::string& message){
    std::string str="Hello, ";
    str+=message;
    return str;
}

int main(int argc,char* argv[])
{
    if(argc != 2){
        std::cerr<<"Usage: "<<argv[0]<<" port"<<std::endl;
        return 1;
    }
    uint16_t port =std::stoi(argv[1]);
    MY::LOG_SCREEN_STRATEGY_ENABLE;
    std::unique_ptr<MY::udpServer>server=std::make_unique<MY::udpServer>(port,defualtFunc);
    server->start();
    return 0;
}